#ifndef __KSVGEDITOR_CORE_KEXPORTJSONREAD_H_
#define __KSVGEDITOR_CORE_KEXPORTJSONREAD_H_

#include <QObject>
#include <QString>

#ifdef KJOSNREAD_DLL
#define KJOSNREAD_EXPORT __declspec(dllexport)
#else
#define KJOSNREAD_EXPORT __declspec(dllimport)
#endif


class KJOSNREAD_EXPORT KExportJsonRead
{
public:
    virtual ~KExportJsonRead() = default;
    virtual void fetchFromUrl(const QUrl & url) = 0;
    virtual QString getTitle(const QString & key) const = 0;
    virtual QString getDescription(const QString & key) const = 0;
    virtual bool loadFallbackJson(const QString & path) = 0;
    virtual QObject* asQObject() = 0;

};

extern  "C" KJOSNREAD_EXPORT KExportJsonRead * createJsonReader(QObject * parent = nullptr);
extern  "C" KJOSNREAD_EXPORT void releaseJsonReader(KExportJsonRead * reader);

#endif //__KSVGEDITOR_CORE_KEXPORTJSONREAD_H_